package sort;

/**
 * Created by Shirly on 2016/8/29.
 */
public class Person implements  Comparable{
    private String age;



    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public Person(String age) {
        this.age = age;

    }

    public int compareTo(Object o) {
        Person a = (Person) o;
        String newAge = a.getAge();
        return this.age.compareTo(newAge);
    }
}
